import ConfigParser
import sys

def isInt(s):
	try: 
		int(s)
		return True
	except ValueError:
		return False

def getConfig(cfile):
        config = ConfigParser.RawConfigParser()
        config.read(cfile)
        return config

def getDBHost(config):
        return config.get("luxmetdb_configs", "host") #myhost

def getDBName(config):
	return config.get("luxmetdb_configs", "dbname") #myhost

def getDBPort(config):
        return int(config.get("luxmetdb_configs", "port")) #myport

def getUser(config):
        return config.get("luxmetdb_configs", "user") #myport

def getPassword(config):
        return config.get("luxmetdb_configs", "password") #myport

if __name__ == "__main__":
        """configfile = sys.argv[1]
        print getDBHost(getConfig(configfile))
	print str(getDBPort(getConfig(configfile)))
	print getDBName(getConfig(configfile))
	print getUser(getConfig(configfile))
	print getPassword(getConfig(configfile))	
	"""
	print ("1.2 " + str(isInt("1.2")))
	print ("12345 " + str(isInt("12345")))
